﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ESSManageService.Enum.WebsocketEnum;
using Newtonsoft.Json;

namespace ESSManageService.Model.WebsocketModels
{
    /// <summary>
    /// WebSocket通用模型类
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class WebSocketMessageBase<T>
    {
        /// <summary>
        /// 命令编号
        /// </summary>
        [JsonProperty]
        public DataCommonEnum Code { get; set; }

        /// <summary>
        /// 返回结果，
        /// 1000：成功；
        /// 1001：失败；
        /// </summary>
        [JsonProperty]
        public VerifyResultEnum Result { get; set; }

        /// <summary>
        /// 返回信息
        /// </summary>
        [JsonProperty]
        public string Message { get; set; }
        /// <summary>
        /// 数据
        /// </summary>
        [JsonProperty]
        public T Data { get; set; }
    }
}
